/**
 * 
 */
package com.lgx.booking.entity;

import java.io.Serializable;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

import com.lgx.common.entity.IdGenerator;
import com.lgx.common.entity.Image;



/**
 * @author hezhuo
 * 
 * 酒店/KTV/餐饮
 *
 */
@Entity
@Table(name="TB_BOOKING")
public class Booking implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -5406464817107186540L;

	@Id
	@GeneratedValue(strategy=GenerationType.TABLE,generator=IdGenerator.BOOKING_ID)
	@TableGenerator(
			name = IdGenerator.BOOKING_ID,
			table = IdGenerator.GENERATOR_TABLE,
			pkColumnName = IdGenerator.GEN_NAME,
			pkColumnValue = IdGenerator.BOOKING_ID,
			valueColumnName = IdGenerator.GEN_VALUE,
			initialValue = 1,
			allocationSize = 1
	)
	private long id;
	
	/**
	 * 名称
	 */
	private String name;
	
	/**
	 * 星级类型
	 */
	private String type;
	
	/**
	 * 酒店=0，KTV=1，餐饮=2
	 */
	private Integer sign;
	
	/**
	 * 描述
	 */
	private String description;
	
	/**
	 * 预订电话
	 */
	private String tel;
	
	/**
	 * 网址
	 */
	private String website;
	
	/**
	 * 乘车路线
	 */
	private String line;
	
	/**
	 * LOGO图片
	 */
	private String logo;
	
	/**
	 * 服务设施
	 */
	private String services;
	
	/**
	 * 省
	 */
	private String province;
	
	/**
	 * 市
	 */
	private String city;
	
	/**
	 * 县区
	 */
	private String county;
	
	/**
	 * 镇、乡、街道
	 */
	private String town;
	
	/**
	 * 明细
	 */
	private String address;
	
	/**
	 * 坐标
	 */
	private String points;	
	
	/**
	 * 是否可用
	 */
	private String isDelete;
	
	/**
	 * 属性1
	 */
	private String prop1;
	
	/**
	 * 属性2
	 */
	private String prop2;
	
	/**
	 * 属性3
	 */
	private String prop3;
	
	@ManyToMany(cascade={CascadeType.ALL},fetch=FetchType.EAGER)    
    @JoinTable(name="TB_BOOKING_IMAGE",   
             joinColumns=@JoinColumn(name="booking_id"),   
             inverseJoinColumns=@JoinColumn(name="image_id")) 
	private Set<Image> images;
	
	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public Integer getSign() {
		return sign;
	}

	public void setSign(Integer sign) {
		this.sign = sign;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getTel() {
		return tel;
	}

	public void setTel(String tel) {
		this.tel = tel;
	}

	public String getWebsite() {
		return website;
	}

	public void setWebsite(String website) {
		this.website = website;
	}

	public String getLine() {
		return line;
	}

	public void setLine(String line) {
		this.line = line;
	}

	public String getLogo() {
		return logo;
	}

	public void setLogo(String logo) {
		this.logo = logo;
	}

	public String getServices() {
		return services;
	}

	public void setServices(String services) {
		this.services = services;
	}

	public String getProvince() {
		return province;
	}

	public void setProvince(String province) {
		this.province = province;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getCounty() {
		return county;
	}

	public void setCounty(String county) {
		this.county = county;
	}

	public String getTown() {
		return town;
	}

	public void setTown(String town) {
		this.town = town;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getPoints() {
		return points;
	}

	public void setPoints(String points) {
		this.points = points;
	}

	public String getIsDelete() {
		return isDelete;
	}

	public void setIsDelete(String isDelete) {
		this.isDelete = isDelete;
	}

	public String getProp1() {
		return prop1;
	}

	public void setProp1(String prop1) {
		this.prop1 = prop1;
	}

	public String getProp2() {
		return prop2;
	}

	public void setProp2(String prop2) {
		this.prop2 = prop2;
	}

	public String getProp3() {
		return prop3;
	}

	public void setProp3(String prop3) {
		this.prop3 = prop3;
	}

	public Set<Image> getImages() {
		return images;
	}

	public void setImages(Set<Image> images) {
		this.images = images;
	}
}
